/* 清除默认样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font: bold 20px "Courier";
}
#control {
  position: absolute;
  top: 50px;
  left: 100px;
  font-size: 18px;
  font-weight: 600;
}
/* 设置主窗口 */
#main {
  width: 360px;
  height: 420px;
  background-color: #b7d4ab;
  margin: 100px auto;
  border-radius: 10px;
  border: 10px solid #444;
  display: flex;
  flex-flow: column;
  justify-content: space-around;
  align-items: center;
}
#main #stage {
  width: 304px;
  height: 304px;
  border: 2px solid black;
  position: relative;
}
#main #stage #snake > div {
  width: 10px;
  height: 10px;
  background-color: teal;
  border: 1px solid #b7d4ab;
  position: absolute;
}
#main #stage #snake > div:first-child {
  width: 10px;
  height: 10px;
  background-color: #7c013a;
  border: 1px solid #b7d4ab;
  transform: rotate(45deg);
}
#main #stage > #food {
  width: 10px;
  height: 10px;
  position: absolute;
  left: 40px;
  top: 80px;
  display: flex;
  flex-wrap: wrap;
}
#main #stage > #food > div {
  width: 5px;
  height: 5px;
  background-color: purple;
  border: 1px solid #b7d4ab;
  transform: rotate(45deg);
}
#main #score-panel {
  width: 100%;
  height: 25px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
